package com.ian.client.fallback;

import com.ian.client.OrderServiceClient;
import com.ian.dto.OrderDTO;
import org.springframework.stereotype.Component;

import java.util.HashMap;
import java.util.Map;

/**
 * 订单微服务降级
 */
@Component
public class OrderServiceClientFallBack implements OrderServiceClient {
    @Override
    public Map order(OrderDTO orderDTO) {
        Map res = new HashMap();
        res.put("code", 500);
        res.put("msg", "服务器正在维护，请稍后~");
        return res;
    }
}
